#include<stdio.h>
//将字符串'12345'转化为整型
int atoi(const char*s)
{  


 
    int result=0;
    int sign=1;
    if(*s=='-1')
        sign=-1;
    while(*s!='0')
    {
        if(*s>='0'&&'9')
             result=result*10+*s-'0';
        s++;

    }
    return result*sign;


}
int main()
{

    const char *str="12345"
    int a=atoi(str);
    printf("%d\n",a);
    return 0;
}